<template>
  <div style="display:flex">
    <div style="flex:1">
      <el-aside>
        <el-menu
          default-active="2"
          class="el-menu-vertical-demo"
          @open="handleOpen"
          @close="handleClose"
          router
        >
          <el-submenu index="1">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>资产/新闻系统</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="/test3">航数资产管理系统</el-menu-item>
              <el-menu-item index="/test2">选项2</el-menu-item>
            </el-menu-item-group>
            <el-menu-item-group title="分组2">
              <el-menu-item :index="{name:'Home_news'}">新闻资讯</el-menu-item>   
            </el-menu-item-group>
            <el-submenu index="1-4">
              <template slot="title">收银系统</template>
              <el-menu-item index="/shop">超市收银系统</el-menu-item>
            </el-submenu>
          </el-submenu>
          <el-menu-item index="/personal">
            <i class="el-icon-menu"></i>
            <span slot="title">个人中心</span>
          </el-menu-item>
         
          <el-menu-item index="/test2">
            <i class="el-icon-document"></i>
            <span slot="title">测试系统</span>
          </el-menu-item>
          <el-menu-item index="/shop">      <!--通过名称导航过来的路由不会显示底色  -->
            <i class="el-icon-setting"></i>
            <span slot="title">超市收银系统</span>
          </el-menu-item>
        </el-menu>
      </el-aside>
    </div>
    <div style="flex:15">
      <el-main>
          <router-view />
      </el-main>
    </div>
  </div>
</template>

<script>
export default {
  name: "Home",
  data() {
    return { message: "首页" };
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
  },



};
</script>

<style>

</style>